 <script th:inline="javascript">
/*<![CDATA[*/

    function del(event,element,data){
    	event.preventDefault();
      	bootbox.confirm("您确定删除吗?", function(result) {
    	if(result){
    		var _id = $(element).attr("href").split("_")[0];
    		var _page=$(element).attr("href").split("_")[1];
    		var _viewState = $(element).attr("href").split('_')[2];
    		BOSS.remoteCall('goods/goods/deleteTrash',$('#div_goodTrash_grid'),{id:_id,page:_page,viewState:_viewState});
    		}
    	}); 
    }
    function updat(event,element,data){
    	event.preventDefault();
      	bootbox.confirm("您确定还原吗?", function(result) {
    	if(result){
    		var back = "back";
    		var _id = $(element).attr("href").split("_")[0];
    		var _page=$(element).attr("href").split("_")[1];
    		var _viewState = $(element).attr("href").split('_')[2];
    		BOSS.remoteCall('goods/goods/updateTrash',$('#div_goodTrash_grid'),{id:_id,page:_page,viewState:_viewState,back:back});
    		}
    	}); 
    }
/*]]>*/
</script>
<table layout:fragment="goods_table" class="table table-striped table-bordered  table-advance table-hover" id="goodTrash_grid">
	<thead>
		<tr>
			<th>编号</th>
			<th>商品名称</th>
			<th>货号</th>
			<th>价格</th>
			<th>上下架状态</th>
			<th>排序</th>
			<th>上传人</th>
			<th>更新时间</th>
			<th>创建时间</th>
			<th>库存</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>
		<tr class="odd gradeX" th:each="data : ${goodsPage}">
			<td th:text="${data.id}"> 
				
			</td>
			
			<td th:text="${data.name}">
				 hstyle
			</td>

			
			<td th:text="${data.goodsSN}">
			
			</td>
			<td th:text="${data.shopPrice}">
				 
			</td>
			<td class="center"  th:text="${data.displayed}? 上架:下架">
				 12 Jan 2012
			</td>
			
			<td th:text="${data.goodsManageSort}">
				 
			</td>
			
			<td th:text="${data.uploadPerson}">
				 
			</td>
			
			<td th:text="${data.modifiedDate.toLocalDate()}">
				 
			</td>
			
			<td th:text="${data.createdDate.toLocalDate()}">
				 
			</td>
			<td th:text="${data.goodsStore}">
				 
			</td>
			<td>
				 <a href="" th:href="${data.id}+'_'+${goodsPage.number}+'_'+${viewState}"  th:attr="id=${'link_update_'+dataStat.index},name=${'link_update_'+dataStat.index}" class="btn default btn-xs purple" onclick="updat(event,this);"><i class="fa fa-edit"></i>还原</a>|
				 <a href="#" th:href="${data.id}+'_'+${goodsPage.number}+'_'+${viewState}" th:attr="id=${'link_delete_'+dataStat.index},name=${'link_delete_'+dataStat.index}" class="btn default btn-xs purple" onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>|
			</td>		 
		</tr>
		
 	</tbody>
</table>
<div th:include="page_footer" th:with="viewState=${viewState},url=${'/goods/goods/indexTrash'},pageContext=${goodsPage}"></div>
